import io.CommandIO;
import io.CourseInput;
import io.ProgramInput;
import io.RoomInput;
import io.Scheduling;
import ioProcessor.OutputProcessor;

import java.io.IOException;
import java.util.Date;

public class Main {
	/*
	 * Note for large test cases: Please uncomment the last two lines in
	 * "generateSchedule()" of "Scheduler.java" They are for displaying results
	 * during runtime
	 */
	public static void main(String args[]) throws IOException {
		RoomInput.roomDataFromFile();
		ProgramInput.programDataFromFile();
		CourseInput.courseDataFromFile();

		// for time calculation
		long msStart = new Date().getTime();

		Scheduling.schedule();
		// OutputProcessor.process();
		System.out.println("Scheduling Finished!!");

		// for time calculation
		long msEnd = new Date().getTime();

		// for time display
		long minutes = (msEnd - msStart) / 1000 / 60;
		long seconds = (msEnd - msStart) / 1000 % 60;

		System.out.println("Total running time: " + minutes + " minutes, "
				+ seconds + " secondes.");

		// for command input
		CommandIO.process();

		OutputProcessor.process();
	}
}
